
import axios from 'axios'

axios.defaults.baseURL = 'http://localhost:8888/api/private/v1/'

export default axios

axios.interceptors.request.use(function (config) {
  let mytoken = localStorage.getItem('Itcast68_token')
  if (mytoken) {
    config.headers.Authorization = mytoken
  }
  return config
},
function (error) {
//   return promise.reject(error)
  return Promise.reject(error)
}
)
